import { View } from '@tarojs/components'
import './index.scss'
import CustomTabBar  from "@/component/CustomTabBar";
import { Cell } from '@nutui/nutui-react-taro';
import shequn_img from '@/static/images/shequn.png'
import inpAct_img from '@/static/images/inpAct.png'
import { IconFont } from '@nutui/icons-react-taro';
import Taro from '@tarojs/taro';

definePageConfig({
  navigationStyle: 'custom'
})
export default function Index () {
  const nav = (flag) => {
    switch (flag) {
      case 'huodong':
        Taro.navigateTo({ url: '/activity/inputActivity' })
        break;
      case 'shequ':
        Taro.navigateTo({ url: '/pages/huodong/index' })
        break;
    }
  }
  return (
    <View className='container' >
      <View className='box' >
        <Cell onClick={()=>nav('huodong')} >
          <View className='cel'>
            <img src={shequn_img} className='img' />
            <View>
              <View>发布活动</View>
              <View>多少恨，昨夜梦魂中。还似旧时游</View>
            </View>
            {<IconFont fontClassName="icon-a-zu80" classPrefix="iconfont" size={18}/>} 
          </View>
        </Cell>
        <Cell onClick={()=>nav('shequn')}>
          <View className='cel'>
            <img src={inpAct_img} className='img' />
            <View>
              <View>登记社群</View>
              <View>多少恨，昨夜梦魂中。还似旧时游</View>
            </View>
            {<IconFont fontClassName="icon-a-zu80" classPrefix="iconfont" size={18}/>} 
          </View>
        </Cell>
      </View>
      <CustomTabBar/>
    </View>
  )
}
